summaryrefslogtreecommitdiff
path: root/app/[lng]/evcp/(evcp)
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-10-15 21:38:21 +0900
committerjoonhoekim <26rote@gmail.com>2025-10-15 21:38:21 +0900
commita070f833d132e6370311c0bbdad03beb51d595df (patch)
tree9184292e4c2631ee0c7a7247f9728fc26de790f1 /app/[lng]/evcp/(evcp)
parent280a2628df810dc157357e0e4d2ed8076d020a2c (diff)
(김준회) 이메일 화이트리스트 (SMS 우회) 기능 추가 및 기존 로그인 과정 통합
Diffstat (limited to 'app/[lng]/evcp/(evcp)')
-rw-r--r--app/[lng]/evcp/(evcp)/(system)/email-whitelist/page.tsx82
1 files changed, 82 insertions, 0 deletions
diff --git a/app/[lng]/evcp/(evcp)/(system)/email-whitelist/page.tsx b/app/[lng]/evcp/(evcp)/(system)/email-whitelist/page.tsx
new file mode 100644
index 00000000..95abd556
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/(system)/email-whitelist/page.tsx
@@ -0,0 +1,82 @@
+/**
+ * 이메일 화이트리스트
+ *
+ * 이메일 도메인의 화이트리스트를 통해, SMS 인증을 우회할 도메인을 관리
+ *
+ * db schema : db/schema/emailWhitelist.ts
+ *
+ * 구현방향: 이메일 화이트리스트 조회 + dialog 기반의 생성/삭제
+ *
+ */
+
+import * as React from "react"
+import { type Metadata } from "next"
+import { getEmailWhitelistList } from "@/lib/email-whitelist/service"
+import { type SearchParams } from "@/types/table"
+import { WhitelistTable } from "@/lib/email-whitelist/table/whitelist-table"
+import { Shell } from "@/components/shell"
+import { Skeleton } from "@/components/ui/skeleton"
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"
+
+// export const metadata: Metadata = {
+// title: "이메일 화이트리스트 관리",
+// description: "SMS 인증 대신 이메일로 인증번호를 받을 도메인 및 개별 이메일을 관리",
+// }
+
+interface WhitelistPageProps {
+ searchParams: SearchParams
+}
+
+export default async function WhitelistPage(props: WhitelistPageProps) {
+
+ const searchParams = await props.searchParams
+
+ // 기본 검색 파라미터 처리
+ const search = {
+ page: searchParams.page ? parseInt(searchParams.page as string) : 1,
+ perPage: searchParams.perPage ? parseInt(searchParams.perPage as string) : 10,
+ search: searchParams.search as string || "",
+ sort: searchParams.sort as string || "createdAt.desc",
+ filters: searchParams.filters ? JSON.parse(searchParams.filters as string) : undefined,
+ }
+
+ const promises = Promise.all([
+ getEmailWhitelistList(search),
+ ])
+
+ return (
+
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">
+ 이메일 화이트리스트 관리
+ </h2>
+ </div>
+ <p className="text-muted-foreground">
+ SMS 인증 대신 이메일로 인증번호를 받을 도메인 및 개별 이메일을 관리합니다.
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}>
+ </React.Suspense>
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={5}
+ searchableColumnCount={1}
+ filterableColumnCount={2}
+ cellWidths={["4rem", "12rem", "20rem", "12rem", "12rem", "8rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <WhitelistTable promises={promises} />
+ </React.Suspense>
+ </Shell>
+ )
+} \ No newline at end of file